package com.zh.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zh.domain.dto.team.*;
import com.zh.domain.entity.Team;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zh.domain.vo.team.TeamUserHistoryVo;
import com.zh.domain.vo.team.TeamUserVo;
import com.zh.domain.vo.user.UserInTeamVo;

import java.util.List;

/**
 * @author Administrator
 * @description 针对表【teams(团队表)】的数据库操作Service
 * @createDate 2025-02-09 16:21:55
 */
public interface TeamService extends IService<Team> {

    boolean add(TeamAddRequest teamAddRequest);

    Boolean deleteTeam(Integer teamId);

    Boolean updateTeam(TeamUpdateRequest teamUpdateRequest);

    Boolean inviteUser(TeamInviteRequest teamInviteRequest);

    String generateInvite(Integer teamId);

    String resolveInvite(String url);

    Boolean application(Integer teamId);

    Boolean auditApplication(TeamAuditRequest teamAuditRequest);

    Page<TeamUserHistoryVo> listTeamUserHistory(TeamUserHistoryPageRequest pageRequest);

    List<TeamUserVo> getTeamUserVoByUserId();

    Page<UserInTeamVo> pageUserInTeam(UserInTeamRequest userInTeamRequest);

    Boolean acceptInvite(AcceptInviteRequest acceptInviteRequest);

    Boolean kickOut(TeamKickOutRequest teamKickOutRequest);

    Boolean isInTeam(Integer teamId, Integer userId);
}
